package com.cpp.pojo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

//# | 字段名        | 类型         | 说明       |
//id INT primary key auto_increment COMMENT '课程id',
//name varchar(255) COMMENT '课程名称',
//description text COMMENT '课程描述',
//user_id INT COMMENT '授课教师id',
//create_time timestamp default now(),
//update_time timestamp default now() on update now()
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Course {
    //课程id
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    private Long subjectId;
    private String name;
    private String description;
    // 授课教师id
    private Long userId;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer status;

    @Override
    public String toString() {
        return "这是"+name+"课程"+description;
    }
}
